home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
ada
/
gwuada_9.zip
/
UNITS.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-27
|
734b
|
32 lines
/*
* Copyright (C) 1985-1992 New York University
*
* This file is part of the Ada/Ed-C system. See the Ada/Ed README file for
* warranty (none) and distribution info and also the GNU General Public
* License for more details.
*/
#include "hdr.h"
#include "vars.h"
#include "unitsp.h"
int unitNumberFromName(char *name) /*;unitNumberFromName*/
{
int i;
if (!name) return 0;
for (i = 1; i <= unit_numbers; i++)
if (pUnits[i]->name && !strcmp(name, pUnits[i]->name))
return i;
return 0;
}
int unitNumberFromLibUnit(char *name) /*;unitNumberFromLibUnit*/
{
int i;
if (!name) return 0;
for (i = 1; i <= unit_numbers; i++)
if (pUnits[i]->libUnit && !strcmp(name, pUnits[i]->libUnit))
return i;
return 0;
}